#include "MainWindow.h"

MainWindow::MainWindow( QWidget* parent ) : QMainWindow( parent )
{
	ui.setupUi( this );
	QObject::connect( ui.singlePlayerButton, SIGNAL(clicked()), this, SLOT(startSinglePlayer()) );
	QObject::connect( ui.multiplayerButton, SIGNAL(clicked()), this, SLOT(startMultiplayer()) );
	QObject::connect( ui.tutorialButton, SIGNAL(clicked()), this, SLOT(startTutorial()) );
	QObject::connect( ui.mapEditorButton, SIGNAL(clicked()), this, SLOT(startMapEditor()) );
}

MainWindow::~MainWindow( )
{
}

void MainWindow::startSinglePlayer( )
{
	GUISinglePlayer* gui = new GUISinglePlayer( this );
	gui->show();
}

void MainWindow::startMultiplayer( )
{
	QMessageBox::warning( this, "RoboRally", "Niet geimplementeerd", QMessageBox::Ok );
}

void MainWindow::startTutorial( )
{
	QMessageBox::warning( this, "RoboRally", "Niet geimplementeerd", QMessageBox::Ok );
}

void MainWindow::startMapEditor( )
{
	MapEditor* editor = new MapEditor( this );
	editor->show();

}
